import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import reportWebVitals from './reportWebVitals';
import * as Vant from 'react-vant';
import Cookies from 'react-cookies'
// 引入react-router-dom
import * as Router from 'react-router-dom'
// 引入icons
import * as Icons from '@react-vant/icons'

// 引入Api
import Api from './api/index'


React.$Vant = Vant
React.$Cookies = Cookies
// 全局挂载Router
React.$Router = Router
React.$Icons = Icons
React.$Api = Api

// 全局登陆信息
React.$LoginAuth = Cookies.load('LoginAuth') ? Cookies.load('LoginAuth') : {}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  // <React.StrictMode>
    <App />
  // </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
